import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {UserFormComponent} from "./user-form/user-form.component";
import { UserTableCopyComponent } from './user-table-copy/user-table-copy.component';
import {UserTableComponent} from "./user-table/user-table.component";

const routes: Routes = [
  {path: '', redirectTo: '/usertable', pathMatch: "full"},
  {path: 'users', component: UserTableComponent},
  {path: 'adduser/:id', component: UserFormComponent},
  {path: 'adduser', component: UserFormComponent},
  {path:'usertable',component:UserTableCopyComponent}

];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule {
}
